cmake_minimum_required(VERSION 3.26)
project(space_invaders)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(CMAKE_CXX_STANDARD 11)
add_subdirectory(glfw)
include_directories(include)
link_directories(lib)
# 复制ddl到指定文件 运行
configure_file(lib/glew32.dll ${CMAKE_BINARY_DIR} COPYONLY)
add_executable(space_invaders main.cpp)
find_package(OpenGL REQUIRED)
target_link_libraries(space_invaders glfw OpenGL::GL glew32.dll)
